Skip to content

Include react-router/dom APIs in typedoc #13509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

brophdawg11
Copy link
Contributor

@brophdawg11 brophdawg11 commented Apr 30, 2025

Closes #13450

This doesn't work as well as I'd hoped - maybe we should just inline the docs now for react-router/dom exports?

Copy link

changeset-bot bot commented Apr 30, 2025

⚠️ No Changeset found

Latest commit: ef05746

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@brophdawg11 brophdawg11 marked this pull request as draft April 30, 2025 18:07
@brophdawg11 brophdawg11 force-pushed the brophdawg11/hydrated-router-docs branch from 3387bc8 to ef05746 Compare April 30, 2025 18:09
@@ -1,5 +1,5 @@
{
"entryPoints": ["./index.ts"],
"entryPoints": ["./index.ts", "./dom-export.ts"],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't do quite what I would have hoped :/. It adds another level of nesting under react-router:

Screenshot 2025-04-30 at 2 08 03 PM

Unsure if theres any way to flatten that to:

react-router
  ...All the current stuff
react-router/dom
  ...New Stuff

import { HydratedRouter, RouterProvider } from "react-router/dom";

// TODO: Confirm if this causes tree-shaking issues and if so, convert to named exports
export type * from "react-router";
export * from "react-router";

export type { RouterProviderProps };
export type { HydratedRouterProps, RouterProviderProps };
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exported so they get included in the typedoc output as a clickable link in the HydratedRouter page

@brophdawg11 brophdawg11 linked an issue Apr 30, 2025 that may be closed by this pull request
@brophdawg11
Copy link
Contributor Author

Closing this out as the outcome isn't quite what we want - Ryan is going to take a look at the typedoc stuff

@brophdawg11 brophdawg11 closed this May 1, 2025
@brophdawg11 brophdawg11 deleted the brophdawg11/hydrated-router-docs branch May 1, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Docs]: HydratedRouter has broken link
1 participant